<template>
    <div class="query-current">
        <el-input @keyup.enter="search" suffix-icon="el-icon-search" width="260px" v-model="keywords" :placeholder="placeholder"></el-input>
        <slot name="other"></slot>
    </div>
</template>
<script>
export default {
    name: 'QueryCurrent',
    props: {
        placeholder: {
            type: String,
            default: '请输入关键字'
        }
    },
    data () {
        return {
            keywords: ''
        }
    },
    methods: {
        search () {
            this.$emit('search', this.keywords)
        }
    }
}
</script>
<style lang="less">
.query-current{
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    overflow:hidden;
    box-sizing:border-box;
    padding: 20px 0;
    .el-input{
        width: 260px;
    }
}
</style>
